ποΈGitΠ―ΡΠ°ποΈ
docs/kmp-status.md 91a61a36caa6f12d4829ea1daa6fb72ec57af95c (91a61a36) Text, 14.77 KB
KMP Migration Status
β Last updated: 2026-04-15
Single source of truth for Kotlin Multiplatform migration progress. For the forward-looking roadmap, see roadmap.md. For completed decision records, see decisions/.
Summary
Meshtastic-Android has completed its Android-first structural KMP migration across core logic and feature modules, with full JVM cross-compilation validated in CI. The desktop target has a working Navigation 3 shell, TCP transport with full mesh handshake, and multiple features wired with real screens.
Modules that share JVM-specific code between Android and desktop now standardize on the T383838meshtastic.kmp.jvm.android convention plugin, which creates T383838jvmAndroidMain via Kotlin's hierarchy template API instead of manual T383838dependsOn(...) source-set wiring.
Module Inventory
Core Modules (21 total)
βββββββββββββββββββ¬βββββββ¬ββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Module β KMP? β JVM target? β Notes β
βββββββββββββββββββΌβββββββΌββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β T383838core:proto β β
β β
β Protobuf definitions β
β T383838core:common β β
β β
β Utilities, T383838jvmAndroidMain source set β
β T383838core:model β β
β β
β Domain models, T383838jvmAndroidMain source set β
β T383838core:repository β β
β β
β Domain interfaces β
β T383838core:di β β
β β
β Dispatchers, qualifiers β
β T383838core:navigation β β
β β
β Shared Navigation 3 routes β
β T383838core:resources β β
β β
β Compose Multiplatform resources β
β T383838core:datastore β β
β β
β Multiplatform DataStore β
β T383838core:database β β
β β
β Room KMP β
β T383838core:domain β β
β β
β UseCases β
β T383838core:prefs β β
β β
β Preferences layer β
β T383838core:network β β
β β
β Ktor, T383838StreamFrameCodec, T383838TcpTransport, T383838SerialTransport, T383838Bβ¦ β
β T383838core:data β β
β β
β Data orchestration β
β T383838core:ble β β
β β
β Kable multiplatform BLE abstractions in commonMain β
β T383838core:nfc β β
β β
β NFC contract in commonMain; hardware in androidMain β
β T383838core:service β β
β β
β Service layer; Android bindings in androidMain β
β T383838core:ui β β
β β
β Shared Compose UI, pure KMP QR generator, T383838jvmAndroidMainβ¦ β
β T383838core:testing β β
β β
β Shared test doubles, fakes, and utilities for T383838commonTest β
β T383838core:takserver β β
β β
β TAK/ATAK integration, Fountain codec β
β T383838core:api β β β β β Android-only (AIDL). Intentional. β
β T383838core:barcode β β β β β Android-only (CameraX). Flavor split minimised to decodeβ¦ β
βββββββββββββββββββ΄βββββββ΄ββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
19/21 core modules are KMP with JVM targets. The 2 Android-only modules are intentionally platform-specific, with shared contracts already abstracted into T383838core:ui/commonMain.
Feature Modules (9 total β 9 KMP with JVM, 1 Android-only widget)
ββββββββββββββββββββββββββ¬ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Module β UI in commonMain? β Desktop wired? β
ββββββββββββββββββββββββββΌββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β T383838feature:settings β β
β β
~35 real screens; fully shared T383838settingsGraph anβ¦ β
β T383838feature:node β β
β β
Adaptive list-detail; fully shared T383838nodesGraph, T383838β¦ β
β T383838feature:messaging β β
β β
Adaptive contacts + messages; fully shared T383838contβ¦ β
β T383838feature:connections β β
β β
Shared T383838ConnectionsScreen with dynamic transportβ¦ β
β T383838feature:intro β β β β β
β T383838feature:map β β β Placeholder; shared T383838NodeMapViewModel, T383838BaseMapViewMβ¦ β
β T383838feature:firmware β β
β β
Fully KMP: Unified OTA, native Secure DFU, USB/β¦ β
β T383838feature:wifi-provision β β
β β
KMP WiFi provisioning via BLE (Nymea protocol);β¦ β
β T383838feature:widget β β β β β
ββββββββββββββββββββββββββ΄ββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Desktop Module
Working Compose Desktop application with:
β’ Navigation 3 shell (T383838NavigationRail + T383838NavDisplay) using shared routes
β’ Full Koin DI graph (stubs + real implementations)
β’ TCP, Serial/USB, and BLE transports with auto-reconnect and full T383838want_config handshake
β’ Adaptive list-detail screens for nodes and contacts
β’ Dynamic Connections screen with automatic discovery of platform-supported transports (TCP, Serial/USB, BLE)
β’ Desktop language picker backed by T383838UiPreferencesDataSource.locale, with immediate Compose Multiplatform resource updates
β’ Navigation-preserving locale switching via T383838Main.kt T383838staticCompositionLocalOf recomposition instead of recreating the Nav3 backstack
β’ Node detail metrics screens (Device, Environment, Signal, Power, Pax) wired with shared KMP + Vico charts
β’ Feature-driven Architecture: Desktop navigation completely relies on feature modules via T383838commonMain exported graphs (T383838settingsGraph, T383838nodesGraph, T383838contactsGraph, etc.), reducing the desktop module to a simple host shell.
β’ Native notifications and system tray icon wired via T383838DesktopNotificationManager
β’ Native release pipeline generating T383838.dmg (macOS), T383838.msi (Windows), and T383838.deb (Linux) installers in CI
Scorecard
ββββββββββββββββββββββββββββββ¬ββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Area β Score β Notes β
ββββββββββββββββββββββββββββββΌββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Shared business/data logic β 9/10 β All core layers shared; RadioTransport interface unified β
β Shared feature/UI logic β 9/10 β 9 KMP feature modules; firmware fully migrated; wifi-proviβ¦ β
β Android decoupling β 9/10 β No known T383838java.* calls in T383838commonMain; app module extractionβ¦ β
β Multi-target readiness β 9/10 β Full JVM; release-ready desktop; iOS simulator builds compβ¦ β
β CI confidence β 9/10 β 26 modules validated (including feature:wifi-provision); nβ¦ β
β DI portability β 8/10 β Koin annotations in commonMain; supportedDeviceTypes injecβ¦ β
β Test maturity β 9/10 β Mokkery, Turbine, and Kotest integrated; property-based teβ¦ β
ββββββββββββββββββββββββββββββ΄ββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Completion Estimates
ββββββββββββββββββββββββββββββββ¬ββββββββ
β Lens β % β
ββββββββββββββββββββββββββββββββΌββββββββ€
β Android-first structural KMP β ~100% β
β Shared business logic β ~98% β
β Shared feature/UI β ~92% β
β True multi-target readiness β ~85% β
β "Add iOS without surprises" β ~100% β
ββββββββββββββββββββββββββββββββ΄ββββββββ
Proposed Next Steps for KMP Migration
Based on the latest codebase investigation, the following steps are proposed to complete the multi-target and iOS-readiness migrations:
1. Wire Desktop Features: Complete desktop UI wiring for T383838feature:intro and implement a shared fallback for T383838feature:map (which is currently a placeholder on desktop).
2. Flesh out iOS Actuals: Complete the actual implementations for iOS UI stubs (e.g., T383838AboutLibrariesLoader, T383838rememberOpenMap, T383838SettingsMainScreen) that were recently added to unblock iOS compilation.
3. Boot iOS Target: Set up an initial skeleton Xcode project to start running the now-compiling T383838iosSimulatorArm64 / T383838iosArm64 binaries on a real simulator/device.
Key Architecture Decisions
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββ¬ββββββββββββ
β Decision β Status β Details β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββ€
β Navigation 3 parity model (shared T383838TopLevelDestination + platform adapters) β β
Done β Both sheβ¦ β
β Hilt β Koin β β
Done β See de
β’ Agent guide: AGENTS.md
β’ Agent skills: .skills/
β’ Decision records: docs/decisions/
Served by rngit 1.5.4 - Generated in 0.12s